package org.luxor.commons.lock4j.core;


/**
 * @author zengzh
 * @since 1.0.0
 */
public class LockInfo {

    /**
     * 锁名称
     */
    private String lockKey;

    /**
     * 锁值
     */
    private String lockValue;

    /**
     * 过期时间(单位:毫秒)
     */
    private Long expire;

    /**
     * 获取锁超时时间(单位:毫秒)
     */
    private Long acquireTimeout;

    /**
     * 获取锁次数
     */
    private int acquireCount = 0;

    public LockInfo(String lockKey, String lockValue, Long expire, Long acquireTimeout, int acquireCount) {
        this.lockKey = lockKey;
        this.lockValue = lockValue;
        this.expire = expire;
        this.acquireTimeout = acquireTimeout;
        this.acquireCount = acquireCount;
    }

    public String getLockKey() {
        return lockKey;
    }

    public void setLockKey(String lockKey) {
        this.lockKey = lockKey;
    }

    public String getLockValue() {
        return lockValue;
    }

    public void setLockValue(String lockValue) {
        this.lockValue = lockValue;
    }

    public Long getExpire() {
        return expire;
    }

    public void setExpire(Long expire) {
        this.expire = expire;
    }

    public Long getAcquireTimeout() {
        return acquireTimeout;
    }

    public void setAcquireTimeout(Long acquireTimeout) {
        this.acquireTimeout = acquireTimeout;
    }

    public int getAcquireCount() {
        return acquireCount;
    }

    public void setAcquireCount(int acquireCount) {
        this.acquireCount = acquireCount;
    }

    @Override
    public String toString() {
        return "LockInfo{" +
                "lockKey='" + lockKey + '\'' +
                ", lockValue='" + lockValue + '\'' +
                ", expire=" + expire +
                ", acquireTimeout=" + acquireTimeout +
                ", acquireCount=" + acquireCount +
                '}';
    }
}
